<template>
	<view class="">
		<u-navbar title="我的评论"></u-navbar>
		<!-- 列表 -->
		<!-- <view v-if="!dataList || !dataList.length" class="empty">
			暂无数据
		</view> -->
		<view v-for="(item,index) in replyCustomerList" :key="index" class="u-flex item-box">
			<view class="u-flex item-head">
				<image v-if="item.myComment.userHead" :src="item.myComment.userHead" class="head-img"></image>
				<image src="../mycenter/myicon/tx.png" class="head-img"></image>
				<view class="u-flex head-box">
					<text class="name">{{item.myComment.userName}}</text>
					<text class="time">{{item.myComment.commentTime}}</text>
				</view>
			</view>
			<view class="u-flex item-content">
				{{item.myComment.content}}
			</view>
			<view class="u-flex item-replay">
				<view class="u-flex item-head">
					<image v-if="item.customerComment.userHead" :src="item.customerComment.userHead" class="head-img"></image>
					<image src="../mycenter/myicon/tx.png" class="head-img"></image>
					<view class="u-flex head-box">
						<view class="u-flex" style="flex: 1;width: 100%;">
							<text class="name">{{item.customerComment.userName}}</text>
							<text class="time">{{item.customerComment.commentTime}}</text>
						</view>
						<text class="content">{{item.customerComment.content}}</text>
					</view>
					
				</view>
			</view>
		</view>
		<view v-for="(item,index) in replyLessonList" :key="index" class="u-flex item-box">
			<view class="u-flex item-head">
				<image v-if="item.myComment.userHead" :src="item.myComment.userHead" class="head-img"></image>
				<image src="../mycenter/myicon/tx.png" class="head-img"></image>
				<view class="u-flex head-box">
					<text class="name">{{item.myComment.userName}}</text>
					<text class="time">{{item.myComment.commentTime}}</text>
				</view>
			</view>
			<view class="u-flex item-content">
				{{item.myComment.content}}
			</view>
			<view class="u-flex item-replay">
				<view class="u-flex item-head">
					<image :src="item.lessonInfoVo.picture" class="lesson-img"></image>
					<view class="u-flex head-box">
						<view class="lesson-name-box">
							<text class="type">【{{item.lessonInfoVo.lessonLableStr}}】</text>
							<text class="name">{{item.lessonInfoVo.lessonName}}</text>
						</view>
						<view class="u-flex row">
							<view class="progess">当前进度：
								<text class="">{{item.lessonInfoVo.studyProgress}}%</text>
							</view>
							<text class="time">{{item.lessonInfoVo.studyHour}}学时 {{item.lessonInfoVo.studyScore}}学分</text>
						</view>
						<view class="u-flex row">
							完成时限：{{item.lessonInfoVo.lessonLableStr}}
						</view>
					</view>
					
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		components: {
		},
		data(){
			return{
				replyCustomerList:[],
				replyLessonList:[],
				dataList:[
					// {
					// 	"lessonName": "测试调和田中芳树在测试调和田中加霸",
					// 	"studyHour": 10,
					// 	"studyScore": 10
					// }
				]
			}
		},
		onLoad() {
			this.initData()
			//var player = new prismplayer({id:"J_prismPlayer",autoplay:false,width:"100%",vid:"${vid}",playauth:"${playAuth}",});
			
		},
		methods:{
			initData(){
				this.$util.request('app/classroom/v1/getMyComment','get',{},false).then(res=>{
					this.replyCustomerList = res.data.replyCustomerVo
					this.replyLessonList = res.data.replyLessonVos
				})
			}
		}
	}
</script>

<style>
	page{
		background: #FFFFFF;
	}
	.top-box {
		background: #FFFFFF;
		position: sticky;
		top: calc(44px + var(--status-bar-height));
		left: 0;
		right: 0;
		z-index: 999;
	}
	
	.item-box{
		padding: 30rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		margin-bottom: 24rpx;
		color: #8C8C8C;
		flex-direction: column;
		align-items: flex-start;
	}
	.item-head{flex: 1;align-items: flex-start;}
	.head-img{
		width: 100rpx;
		height: 100rpx;
		margin-right: 20rpx;
		border-radius: 50%;
		overflow: hidden;
	}
	.head-box{
		flex: 1;
		flex-direction: column;
	}
	.head-box .name{flex: 1; font-size:28rpx;font-weight: 700;line-height: 50rpx;}
	.head-box .time{color: #8C8C8C; font-size: 26rpx;}
	.head-box .content{width: 100%; color: #8C8C8C; font-size: 24rpx;line-height: 30rpx;}
	.head-box .progess{flex: 1; color: #F53939;}
	.head-box .progess .num{color: #F53939;}
	
	.row{flex: 1;width: 100%;}
	.item-content{
		width: 100%;
		margin-top: 20rpx;
	}
	.item-replay{
		width: 100%;
		background-color: #ECECEC;
		color: $default-font-color;
		border-radius: 4rpx;
		margin-top: 20rpx;
		padding: 20rpx;
		font-size: 24rpx;
	}
	
	
	.lesson-img{
		width: 200rpx;
		height: 100rpx;
		margin-right: 20rpx;
	}
	.lesson-name-box{width: 100%; font-size: 24rpx;}
	.lesson-name-box .type{color: 100%;color: #F53939;}
	.empty{
		margin: 40rpx;
		color: #BFBFBF;
		text-align: center;
		font-size: 28rpx;
	}
</style>
